package org.summer.lawyer.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.summer.common.mybatis.core.mapper.BaseMapperPlus;
import org.summer.lawyer.domain.SpuOrder;
import org.summer.lawyer.domain.bo.spuorder.SpuOrderBo;
import org.summer.lawyer.domain.bo.spuorder.SpuOrderIncomeStatBo;
import org.summer.lawyer.domain.bo.spuorder.SpuOrderStatBo;
import org.summer.lawyer.domain.vo.spuorder.SpuOrderIncomeStatVo;
import org.summer.lawyer.domain.vo.spuorder.SpuOrderTotalStatVo;
import org.summer.lawyer.domain.vo.spuorder.SpuOrderVo;

import java.util.List;

/**
 * 订单信息Mapper接口
 *
 * @author summer
 * @date 2024-06-21
 */
@Mapper
public interface SpuOrderMapper extends BaseMapperPlus<SpuOrder, SpuOrderVo> {


    SpuOrderTotalStatVo selectSpuOrderStat(@Param(Constants.WRAPPER) Wrapper<SpuOrderStatBo> queryWrapper);

    List<SpuOrderIncomeStatVo> selectSpuOrderIncomeStat(@Param(Constants.WRAPPER) Wrapper<SpuOrderIncomeStatBo> queryWrapper);

    Page<SpuOrderVo> selectUserOrderPageList(@Param("page") Page<SpuOrderVo> page, @Param(Constants.WRAPPER) Wrapper<SpuOrderBo> queryWrapper);

    SpuOrderVo selectUserOrderByOrderId(@Param("orderId") Long orderId);
}
